package cn.bellychang.ood.atmsimulator;

import cn.bellychang.ood.atmsimulator.transaction.Transaction;

/**
 * @author ChangLiang
 * @date 2020/5/21
 */
public class BankProxy {

    public boolean validateCardNoAndPassword(String cardNo, String password) {
        boolean isValid = false;
        if (cardNo.equals("654321") && password.equals("123456")) {
            isValid = true;
        }
        System.err.printf("validate cardNo = %s and password = %s and validate result = %b\n", cardNo, password, isValid);
        return isValid;
    }

    public String doWithdrawTx(Transaction transaction) {
        return "do withdrawTx with bank";
    }

    public String doDepositTx(Transaction transaction) {
        return "do depositTx with bank";
    }

    public String doQueryBalance(Transaction transaction) {
        return "do query balance with bank";
    }

    public String doTransfer(Transaction transaction) {
        return "do transfer tx with bank";
    }
}
